﻿using System;

namespace Model
{
    public class YX_BankCheck : IYX_Bill_Base
    {
        /// <summary>
        /// 银行本票ID
        /// </summary>
        public decimal N_BANKCHECK_ID { get; set; }

        /// <summary>
        /// 出票公司ID
        /// </summary>
        public decimal N_BANKCHECK_CMYID { get; set; }

        /// <summary>
        /// 票据编号
        /// </summary>
        public string C_BANKCHECK_CODE { get; set; }

        /// <summary>
        /// 银行本票收款人
        /// </summary>
        public string C_BANKCHECK_NAMEPAYEE { get; set; }

        /// <summary>
        /// 银行本票申请人
        /// </summary>
        public decimal N_BANKCHECK_USERID { get; set; }

        /// <summary>
        /// 银行本票出票日期
        /// </summary>
        public DateTime D_BANKCHECK_DATE { get; set; }

        /// <summary>
        /// 银行本票出票金额
        /// </summary>
        public decimal N_BANKCHECK_MONEY { get; set; }

        /// <summary>
        /// 银行本票支付类型（1 转账，2 现金）现金不允许背书转让
        /// </summary>
        public decimal N_BANKCHECK_TYPE { get; set; }

        /// <summary>
        /// 银行本票备注（承诺、签章）
        /// </summary>
        public string C_BANKCHECK_REMARK { get; set; }

        /// <summary>
        /// 银行本票支付银行ID
        /// </summary>
        public decimal N_BANKCHECK_BANKID { get; set; }

        /// <summary>
        /// 银行本票支付账号
        /// </summary>
        public string C_BANKCHECK_ACCOUNTNUMBER { get; set; }

        #region YX_Bill_Base 成员

        public int ID
        {
            get
            {
                return (int)N_BANKCHECK_ID;
            }
            set
            {
                N_BANKCHECK_ID = value;
            }
        }

        public int DE_COMPANY_ID
        {
            get
            {
                return (int)N_BANKCHECK_CMYID;
            }
            set
            {
                N_BANKCHECK_CMYID = value;
            }
        }

        public int DE_BANK_ID
        {
            get
            {
                return (int)N_BANKCHECK_BANKID;
            }
            set
            {
                N_BANKCHECK_BANKID = value;
            }
        }

        public string ACCOUNT
        {
            get
            {
                return C_BANKCHECK_ACCOUNTNUMBER;
            }
            set
            {
                C_BANKCHECK_ACCOUNTNUMBER = value;
            }
        }

        public string PAYEENAME
        {
            get
            {
                return C_BANKCHECK_NAMEPAYEE;
            }
            set
            {
                C_BANKCHECK_NAMEPAYEE = value;
            }
        }

        public DateTime? START_DATE
        {
            get
            {
                return D_BANKCHECK_DATE;
            }
            set
            {
                if (value != null)
                {
                    D_BANKCHECK_DATE = value.Value;
                }
            }
        }

        public decimal PAY_AMOUNT
        {
            get
            {
                return (int)N_BANKCHECK_MONEY;
            }
            set
            {
                N_BANKCHECK_MONEY = value;
            }
        }

        public string DE_CODE
        {
            get
            {
                return C_BANKCHECK_CODE;
            }
            set
            {
                C_BANKCHECK_CODE = value;
            }
        }

        public string REMARK
        {
            get
            {
                return C_BANKCHECK_REMARK;
            }
            set
            {
                C_BANKCHECK_REMARK = value;
            }
        }

        #endregion YX_Bill_Base 成员
    }

    public class YX_Bill_BaseBC
    {
        /// <summary>
        /// 汇票ID
        /// </summary>
        public int N_ID { get; set; }

        /// <summary>
        /// 汇票出票人公司ID
        /// </summary>
        public int N_COMPANY_ID { get; set; }

        /// <summary>
        /// 汇票出票人银行ID
        /// </summary>
        public int N_BANK_ID { get; set; }

        /// <summary>
        /// 汇票出票人账户
        /// </summary>
        public string C_ACCOUNT { get; set; }

        /// <summary>
        /// 汇票收款人
        /// </summary>
        public string C_PAYEENAME { get; set; }

        /// <summary>
        /// 汇票出票日期
        /// </summary>
        public DateTime? D_START_DATE { get; set; }

        /// <summary>
        /// 汇票出票金额
        /// </summary>
        public decimal N_PAY_AMOUNT { get; set; }

        /// <summary>
        /// 汇票交易合同号
        /// </summary>
        public string C_CODE { get; set; }

        /// <summary>
        /// 汇票备注
        /// </summary>
        public string C_REMARK { get; set; }
    }

    public class BC : YX_Bill_Base
    {
        /// <summary>
        /// 银行本票支付类型（1 转账，2 现金）现金不允许背书转让
        /// </summary>
        public decimal N_BANKCHECK_TYPE { get; set; }
    }
}